Adding some more judges, here and there.
[and.git] / UVa / 11462 - Age sort / 11462.cpp
blobdc73186f8408c53f6af664174b8c6b493706c01d
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <iostream>
5 using namespace std;
8 const int SIZE = 100;
10 int v[SIZE+1];
12 int main(){
13 int n, i, j;
14 while (scanf("%d", &n) == 1 && n){
15 memset(v, 0, sizeof v);
16 for (int i=0; i<n; ++i){
17 scanf("%d", &j);
18 ++v[j];
20 bool first = true;
21 for (int i=1; i<=SIZE; ++i){
22 while (v[i]--){
23 if (!first) printf(" ");
24 first = false;
25 printf("%d", i);
28 puts("");
30 return 0;